package by.bsu.fpmi.bbtp.controllers;

import by.bsu.fpmi.bbtp.authentication.AllowedRoles;
import by.bsu.fpmi.bbtp.authentication.Role;
import by.bsu.fpmi.bbtp.entities.Good;
import by.bsu.fpmi.bbtp.entities.GoodHead;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import java.util.List;

@WebService
@SOAPBinding(style= SOAPBinding.Style.RPC)
@AllowedRoles({Role.SALESMAN, Role.CATALOG_MANAGER, Role.STOCKMAN})
public interface GoodController {

    @WebMethod
    public Good getGood(@WebParam(name = "sessionId") String sessionId,
                        @WebParam(name = "goodId") long goodId);

    @WebMethod
    public List<GoodHead> getAllGoods(@WebParam(name = "sessionId") String sessionId);
}
